1. Field of the Invention
The present invention relates to image processing, and in particular to, for example, an apparatus and a method for detecting an entire or a part of a specific object such as a human, an animal, a vehicle, and a physical body in a moving image.
2. Description of the Related Art
Conventionally, the following techniques have been discussed as techniques for detecting an object in an image captured by a camera. First, there is a method for detecting a moving object by the background subtraction method. In the background subtraction method, an image without an object is captured by a fixedly installed camera and is registered as a background in advance. Then, a difference is calculated between an image input from the camera when an object is detected and the registered background, and a region with some difference is detected as a moving object. Further, improvement of this technique has been proposed.
For example, Japanese Patent Application Laid-Open No. 2004-213572 discusses the improvement in detection accuracy by hourly recording a background, and recording reflection by a mirror, a degree of glossiness, and a change of color information. As another example, Japanese Patent Application Laid-Open No. 2008-299516 discusses a technique for evaluating the possibility of swing of a shadow, and automatically setting a detection region so as to reduce false detection due to the shadow. This possibility of swing of a shadow is evaluated with use of, for example, an area ratio of a changed region obtained based on the background difference and a varying region obtained based on variation in luminance of pixels, and duration time when the changed region and the varying region overlap.
As still another example, Japanese Patent No. 4171310 discusses a technique for reducing false detection by determining whether a moving object detected in a detection region is an object to be ignored, and automatically correcting the detection region. More specifically, whether a moving object is an intruding object is determined based on duration time when a changed region outside a non-detection region is detected. Further, the detection region is automatically corrected based on this result.
On the other hand, one example of techniques for detecting an object such as a face or a human in an image is discussed in “Rapid Object Detection using a Boosted Cascade of Simple Features” written by Paul Viola and Michael Jones, presented at 2001 IEEE Computer Society Conference on Computer Vision and Pattern Recognition (hereinafter referred to as “non-patent document 1”). This technique scans a predetermined-sized detection window in an input image, and determines pattern images formed by clipping an image in the detection window into two classes, i.e., the object or not.
To facilitate the determination of the class, the technique provides a discriminator constructed by effectively combining a large number of weak discriminators using AdaBoost to improve the determination accuracy, and provides a cascade type detector constructed by connecting these discriminators in series. Further, each weak discriminator is configured to make a determination based on a Haar type rectangular feature amount, and rapidly calculate the rectangular feature amount using an integral image.
This cascade type detector first removes a pattern candidate that is obviously not an object on the spot, using a simple discriminator (handling a smaller calculation amount) on a previous stage. Only the remaining candidates are determined whether they are an object by a complex discriminator (handling a larger calculation amount) having a higher identification performance on a latter stage. In this way, this technique eliminates the necessity of making complex determinations for all of the candidates, thereby achieving high-speed processing.
However, if there is a reflective region where a window or a highly reflective wall exists in an input image, the conventional object detection techniques may cause false detection by being affected by a reflection, and therefore such a reflective region is handled as a non-detection region. Accordingly, an object passing in front of the reflective region cannot be detected, and a limitation is imposed on a location where a camera is installed.